import React, { Component } from 'react'
import style from './Login.module.less'
import Middleware from './components/middleware'
export default class Login extends Component {
  state = {
    date: 'logon'
  }
  onChangPage = (event) => {
    if (this.state.date === 'logon') {
      this.setState({
        date: 'Sign_in'
      })
      console.log(this.state.date);
    } else {
      this.setState({
        date: "logon"
      })
    }
  }
  render() {
    return (
      <div className={style.Page_box}>
        <div className={style.login_box}>
          <div className={style.logo}>
            {/* <h1>logo</h1> */}
          </div>
          <Middleware date={this.state.date} onChangPage={this.onChangPage} />
        </div>
      </div>
    )
  }
}
